package org.jeecg.modules.demo.mall.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.springframework.format.annotation.DateTimeFormat;

import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;

/**
 * @Description: 商品等级价格表
 * @Author: jeecg-boot
 * @Date:   2023-11-10
 * @Version: V1.0
 */
@Data
@TableName("yx_level_product_discount")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="yx_level_product_discount对象", description="商品等级价格表")
public class YxLevelProductDiscount implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键id*/
	@TableId(type = IdType.AUTO)
    @ApiModelProperty(value = "主键id")
    private Integer id;
	/**商品id*/
	@Excel(name = "商品id", width = 15)
    @ApiModelProperty(value = "商品id")
    private Long productId;
	/**等级id*/
	@Excel(name = "等级id", width = 15)
    @ApiModelProperty(value = "等级id")
    private Integer levelId;
    /**类型（0 平台   1  商家）*/
    @Excel(name = "类型（0 平台   1  商家）", width = 15)
    @ApiModelProperty(value = "类型（0 平台   1  商家）")
    private Integer productType;
    /**门店id*/
    @Excel(name = "门店id", width = 15)
    @ApiModelProperty(value = "门店id")
    private Integer merchantId;
	/**等级折扣*/
	@Excel(name = "等级折扣", width = 15)
    @ApiModelProperty(value = "等级折扣")
    private BigDecimal discount;
	/**创建时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间")
    private Date createTime;
	/**修改时间*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "修改时间")
    private Date updateTime;
	/**是否删除（0 未删除 1 删除）*/
	@Excel(name = "是否删除（0 未删除 1 删除）", width = 15)
    @ApiModelProperty(value = "是否删除（0 未删除 1 删除）")
    @TableLogic
    private Integer isDel;

    /**商品id*/
    @TableField(exist = false)
    private String productName;
    /**等级名称*/
    @TableField(exist = false)
    private String levelName;
}
